﻿<!DOCTYPE html>
<html >
<head>

	<link rel="stylesheet" href="dojo/dijit/themes/claro/claro.css">
	
	<script>dojoConfig = { parseOnLoad: false }</script>
	<script src='dojo/dojo/dojo.js'></script>
	
	<script>
	    require([
            "dojo/_base/declare", "dojo/parser",
            "dijit/_WidgetBase", "dijit/_TemplatedMixin", "dojo/domReady!"
	    ], function (declare, parser, _WidgetBase, _TemplatedMixin) {
	        var MyButton = declare("MyButton", [_WidgetBase, _TemplatedMixin], {
	            templateString:
                    "<button data-dojo-attach-point='containerNode' data-dojo-attach-event='onclick: onClick'></button>",
	            onClick: function (evt) {
	                alert("Awesome!!");
	            }
	        });
	        parser.parse();
	    });
	</script>
</head>
<body class="claro">
    <button data-dojo-type="MyButton">press me</button>
</body>
</html>